<template>
    <div>
        <div style="margin-bottom:55px">
            <p v-for="(v,k) of 50" :key="k">{{v}}</p>
        </div> 
        <mt-tabbar v-model="current" fixed>
            <mt-tab-item id="index">
                <img src="../assets/news.png" alt="" slot="icon">
                首页
            </mt-tab-item>
            <mt-tab-item id="account">我的</mt-tab-item>
            <mt-tab-item id="cart">购物车</mt-tab-item>
        </mt-tabbar>
    </div>
</template>
<script>
 export default {
    data(){
        return {
            current:"index"
        }
    },
    watch:{
        current(value){
            if(value=="index"){
               this.$router.push("/")
            }else if(value=="account"){
               this.$router.push("/register");
            }else if("value==cart"){
                this.$router.push("/login");

            }
        }
    }
}
</script>